package com.qersoft.controller;

import com.qersoft.entity.User;
import com.qersoft.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    private UserService userService;

    // 获取所有学生信息接口
    @GetMapping("/")
    public Iterable<User> getAllStudents() {
        return userService.getAllStudents();
    }
}